#!/bin/sh

## The mpirun command controls several aspects of program
## execution in Open MPI. mpirun uses the Open Run-Time
## Environment (ORTE) to launch jobs.

cd /tmp || exit
cp -a /lkp/benchmarks/hpcc/_hpccinf.txt hpccinf.txt
cp -a /lkp/benchmarks/hpcc/hpcc hpcc
if [ "$os" == "centos" ] ;then
	export PATH=$PATH:/usr/lib64/openmpi/bin
fi
if [ "$os" == "openeuler" ] ;then
	cp -r /lkp/benchmarks/hpcc/openmpi /usr/local/openmpi
	export PATH=/usr/local/openmpi/bin:$PATH
	export LD_LIBRARY_PATH=/usr/local/openmpi/lib:$LD_LIBRARY_PATH
fi

log_cmd orterun --allow-run-as-root -np $nr_cpu hpcc

cat /tmp/hpccoutf.txt
